Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not review] fix: remove explicit CXX from reflex third party #4595

Closed
wants to merge 13 commits into from

Conversation

kostasrim
Copy link
Contributor

It was impossible to compile dragonfly on my mac when CXX flag was set. The issue is that building the reflex lib explicitly set the CXX to CMAKE_CXX_COMPILER. However when the first is set in bash and the second is empty, cmake will try to resolve the value of CMAKE_CXX_COMPILER which would be different than the one set via the variable CXX.

@kostasrim kostasrim self-assigned this Feb 12, 2025
@kostasrim
Copy link
Contributor Author

BorysTheDev
BorysTheDev previously approved these changes Feb 12, 2025
@romange romange dismissed BorysTheDev’s stale review February 12, 2025 11:53

breaks the build

BorysTheDev
BorysTheDev previously approved these changes Feb 12, 2025
@kostasrim kostasrim changed the title fix: remove explicit CXX from reflex third party [do not review] fix: remove explicit CXX from reflex third party Feb 12, 2025
@kostasrim
Copy link
Contributor Author

I am closing as the changes are not needed.

Removing CMAKE_CXX_COMPILER from reflex causes a linker failure with an error std::__1::basic_string. This is a name mangle for libc++ and not libstdc++ which we would expect with gcc-12.

The interesting thing is that the value of CMAKE_CXX_COMPILER when not explicitly set is deduced differently on our github runner(macos-13) and on my machine (macos-14).

The former, respects the value of CXX env variable(when set) such that CMAKE_CXX_COMPILER takes the value of CXX. However, this is not true for my machine. My CXX is set to /usr/bin/clang++ and its value is ignored by CMAKE_CXX_COMPILER and instead is deduced to /Library/Developer/CommandLineTools/usr/bin/clang++.

This is problematic because /Library/Dev/... does not set the include and library paths of the c++ standard library as opposed to /usr/bin/clang++ which does that for us.

Therefore I am forced to use CMAKE_CXX_COMPILER explicitly when invoking cmake even if CXX env is set if I want to compile with the llvm supplied by macos. This is rather unfortunate and error prone (as you need to remember to set CMAKE_CXX or you won't compile) but I don't see a good way to resolve.

@kostasrim kostasrim closed this Feb 12, 2025
@kostasrim kostasrim deleted the kpr15 branch February 13, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants